Hardware-software codesign